package com.itheima.filter.service.impl;


import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.itheima.filter.service.inter.EmpLogService;
import com.itheima.mapper.EmpLogMapper;
import com.itheima.project.log.EmpLog;
import com.itheima.project.PageBean;
import com.itheima.project.log.LogQueryParam;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

@Service
public class EmpLogServiceIml implements EmpLogService {
    @Resource
    private EmpLogMapper empLogMapper;

    @Override
    public PageBean page(LogQueryParam eqp) {
        PageHelper.startPage(eqp.getPage(),eqp.getPageSize());

        Page<EmpLog> empPage = empLogMapper.list(eqp);

        return new PageBean(empPage.getTotal(),empPage.getResult());
    }
}
